<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<title>欢迎</title>
	<style>
		html,
		body {
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			overflow: hidden;
		}

		iframe {
			border: none;
			width: 100%;
			height: calc(100vh - 3.5rem);
		}

		.footer {
			position: fixed;
			bottom: 0;
			height: 3.5rem;
			width: 100vw;
			padding-top: 0.3rem;
			background-color: #E8E8E8;
		}

		.shortcut {
			display: inline-table;
			text-align: center;
			width: calc(100vw / 3.1);
		}

		.shortcut div {
			font-size: 0.85rem;
		}

		.shortcut i {
			font-size: 1.5rem;
		}

		.shortcut img {
			width: 1.5rem;
			height: 1.5rem;
		}

		a {
			text-decoration: none;
			color: black;
		}
	</style>
</head>

<body>
	<div class="main">
		<iframe name="iframe" id="iframe" style="overflow-y: auto;"></iframe>
	</div>
	<div class="footer">
		<a href="chat_addresslist.html" target="iframe">
			<div class="shortcut">
				<img src="image/phone.svg">
				<div>通讯录</div>
			</div>
		</a>
		<a href="classes_circle.html" target="iframe">
			<div class="shortcut">
				<img src="image/classes_circle.png">
				<div>班级圈</div>
			</div>
		</a>
		<a id="center" target="iframe">
			<div class="shortcut">
				<img src="image/person_center.svg">
				<div>个人中心</div>
			</div>
		</a>
	</div>

	<script src="/scriptZIP/axios.min.js"></script>
	
	<script src="/wechat/js/wx.js"></script>

	<script>
		var iframe = document.getElementById('iframe');
		var center = document.getElementById('center');

		iframe.onload = function () {
			document.title = this.contentWindow.document.title;
			var user = sessionStorage['hxt-user'];
			if (user == 'student') center.href = '/wechat/student/student_center2.html';
			if (user == 'teacher') center.href = '/wechat/teacher/teacher_center2.html';
		}

		var href = location.search.match(/\bhref=([^&]+)/);
		href = href && href[1];
		href = href && decodeURIComponent(href);
		iframe.src = href;

	</script>

</body>

</html>